package ruifight.member.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import ruifight.member.dao.UserInfoMapper;
import ruifight.member.model.UserInfo;
import ruifight.member.model.UserInfoExample;
import ruifight.member.service.UserInfoService;
import ruifight.member.service.base.BaseServiceImpl;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service
public class UserInfoServiceImpl extends BaseServiceImpl<UserInfo, UserInfoExample, Long> implements UserInfoService {
    @Resource
    private UserInfoMapper userInfoMapper;

    public PageInfo<Map<String, Object>> getUserInfoList(int cur_page, int page_size,Map<String, Object> paramMap){
        PageHelper.startPage(cur_page, page_size);
        List<Map<String, Object>> pageList = userInfoMapper.getUserInfoList(paramMap);
        PageInfo<Map<String, Object>> pageInfo = new PageInfo<Map<String, Object>>(pageList);
        return pageInfo;
    }
}
